package cn.stylefeng.guns.modular.knowledge.mapper;

import cn.stylefeng.guns.modular.knowledge.entity.KnowledgeContent;
import cn.stylefeng.guns.modular.knowledge.model.params.KnowledgeContentParam;
import cn.stylefeng.guns.modular.knowledge.model.result.KnowledgeContentResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 知识点 Mapper 接口
 * </p>
 *
 * @author CHENCHEN
 * @since 2022-07-27
 */
public interface KnowledgeContentMapper extends BaseMapper<KnowledgeContent> {

    /**
     * 获取列表
     *
     * @author CHENCHEN
     * @Date 2022-07-27
     */
    List<KnowledgeContentResult> customList(@Param("paramCondition") KnowledgeContentParam paramCondition);

    /**
     * 获取map列表
     *
     * @author CHENCHEN
     * @Date 2022-07-27
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") KnowledgeContentParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author CHENCHEN
     * @Date 2022-07-27
     */
    Page<KnowledgeContentResult> customPageList(@Param("page") Page page, @Param("paramCondition") KnowledgeContentParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author CHENCHEN
     * @Date 2022-07-27
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") KnowledgeContentParam paramCondition);

	/**
     * 根据专业查询知识点
     * @param specialtyId
     * @return
     */
    List<Map<String, Object>> getKnowledgeList(Long specialtyId);

    KnowledgeContentResult selectDetailById(Long id);
}
